import request from '@/utils/request'

// 查询API接口配置列表
export function listApiConfig(query) {
  return request({
    url: '/system/apiConfig/list',
    method: 'get',
    params: query
  })
}

// 查询API接口配置详细
export function getApiConfig(apiConfigId) {
  return request({
    url: '/system/apiConfig/' + apiConfigId,
    method: 'get'
  })
}

// 新增API接口配置
export function addApiConfig(data) {
  return request({
    url: '/system/apiConfig',
    method: 'post',
    data: data
  })
}

// 修改API接口配置
export function updateApiConfig(data) {
  return request({
    url: '/system/apiConfig',
    method: 'put',
    data: data
  })
}

// 删除API接口配置
export function delApiConfig(apiConfigId) {
  return request({
    url: '/system/apiConfig/' + apiConfigId,
    method: 'delete'
  })
}


export function generateKeyPair(data) {
  return request({
    url: '/system/apiConfig/generateKeyPair',
    method: 'post',
    data: data
  })
}

